#pragma once
#include <string>
#include <vector>
#include <map>

class redisContext;

class RedisManager
{
public:
	static RedisManager &getInstance(){static RedisManager redisManager; return redisManager;}

	int Init();
	int Start();

	int HashGetAll(const std::string &strHashKey, std::map<std::string, std::string> &mapData);
	void HashSet(const std::string &strHashKey, const std::string &strHashField, const std::string &strHashValue);

	int Destroy();

public:
	static const std::string DB_PLAYER;


private:
	static const std::string sRedisServerIp;
	static const int sRedisServerPort = 6379;



	redisContext *m_pContext;

};

